﻿namespace = dvg_hungary

# The Revolt of Bosniak Beys
dvg_hungary.1 = {
	type = country_event
	placement = ROOT

	title = dvg_hungary.1.t
	desc = dvg_hungary.1.d
	flavor = dvg_hungary.1.f
	
	event_image = {
		video = "gfx/event_pictures/europenorthamerica_before_the_battle.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/aristocrats"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	# We will crush them before they cause any tension.
	option = {
		name = dvg_hungary.1.a
		default_option = yes
		add_radicals = {
			value = 0.25
		}
		add_loyalists = {
			value = 0.3
			culture = cu:hungarian
		}
		add_journal_entry = {
			type = je_revolt_of_bosnian_beys
		}
		ai_chance = {
			base = 1
		}
	}
}

# The Flight of the Bosniak Beys
dvg_hungary.2 = {
	type = country_event
	placement = ROOT

	title = dvg_hungary.2.t
	desc = dvg_hungary.2.d
	flavor = dvg_hungary.2.f
	
	event_image = {
		video = "gfx/event_pictures/europenorthamerica_political_extremism.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/aristocrats"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	immediate = {
		random_scope_state = {
			limit = {
				state_region = s:STATE_BANAT
			}
			save_scope_as = dvg_banat
		}
		random_scope_state = {
			limit = {
				state_region = s:STATE_VOJVODINA
			}
			save_scope_as = dvg_vojvodina
		}
		c:CRO = {
			random_scope_state = {
				limit = {
					state_region = s:STATE_BOSNIA
				}
				save_scope_as = dvg_bosnia
			}
		}
		c:CRO = {
			random_scope_state = {
				limit = {
					state_region = s:STATE_CROATIA
				}
				save_scope_as = dvg_croatia
			}
		}
		c:SER = {
			random_scope_state = {
				limit = {
					state_region = s:STATE_NORTHERN_SERBIA
				}
				save_scope_as = dvg_serbia
			}
		}
		c:CRO = {
			trigger_event = { id = dvg_illyria.1 }
		}
	}
	
	# Good, we can replace them with patriotic Hungarians.
	option = {
		name = dvg_hungary.2.a
		default_option = yes
		add_loyalists = {
			value = 0.3
			culture = cu:hungarian
		}
		add_loyalists = {
			value = 0.1
		}
		scope:dvg_vojvodina = {
			add_modifier = {
				name = dvg_attract_hungarians
				months = 24
			}
		}
		scope:dvg_banat = {
			add_modifier = {
				name = dvg_attract_hungarians
				months = 24
			}
		}
		hidden_effect = {
			s:STATE_VOJVODINA = {
				remove_homeland = bosniak
				every_scope_state = {
					every_scope_pop = {
						limit = {
							culture = cu:bosniak
						}
						move_pop = scope:dvg_croatia
					}
				}
			}
			s:STATE_BANAT = {
				remove_homeland = bosniak
				every_scope_state = {
					every_scope_pop = {
						limit = {
							culture = cu:bosniak
						}
						move_pop = scope:dvg_bosnia
					}
				}
			}
			s:STATE_TRANSDANUBIA = {
				every_scope_state = {
					every_scope_pop = {
						limit = {
							culture = cu:bosniak
						}
						move_pop = scope:dvg_serbia
					}
				}
			}
			s:STATE_CENTRAL_HUNGARY = {
				every_scope_state = {
					every_scope_pop = {
						limit = {
							culture = cu:bosniak
						}
						move_pop = scope:dvg_serbia
					}
				}
			}
			s:STATE_BEKES = {
				every_scope_state = {
					every_scope_pop = {
						limit = {
							culture = cu:bosniak
						}
						move_pop = scope:dvg_serbia
					}
				}
			}
		}
		ai_chance = {
			base = 1
		}
	}

	# Stop them!
	option = {
		name = dvg_hungary.2.b
		add_radicals = {
			value = 1
			culture = cu:bosniak
		}
		add_loyalists = {
			value = 0.1
		}
		ai_chance = {
			base = 0
		}
	}
}

#The Bosniaks win!(what the f**k happened)
dvg_hungary.3 = {
	type = country_event
	placement = ROOT

	title = dvg_hungary.3.t
	desc = dvg_hungary.3.d
	flavor = dvg_hungary.3.f
	
	event_image = {
		video = "gfx/event_pictures/europenorthamerica_before_the_battle.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/southamerica/aristocrats"

	icon = "gfx/interface/icons/event_icons/event_fire.dds"

	duration = 3

	trigger = {
	}
	
	# We are F**KED
	option = {
		name = dvg_hungary.3.a
		default_option = yes
		add_radicals = {
			value = 0.90
			culture = cu:romanian
		}
		add_radicals = {
			value = 0.90
			culture = cu:slovak
		}
		add_loyalists = {
			value = 0.10
			culture = cu:hungarian
		}
		ai_chance = {
			base = 1
		}
	}
}